-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: move progress related apis permissions to standard permission file #51
base: open-release/palm.nelp
Are you sure you want to change the base?
feat: move progress related apis permissions to standard permission file #51
Conversation
e32e53c
to
6c012fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tehreem-sadat. Do we have existing test case to cover this behaviour? If not, we should add at least one test case.
Other than that, the code looks clean and it looks great.
There are already detailed tests covering both API's. In this PR we didn't change any behaviour just did some restructuring so I don't think any new tests are required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks great, thank you @tehreem-sadat ! I'm marking it as request changes to avoid merging until I test it in my local with all possible scenarios I can think of
@@ -186,8 +187,9 @@ def get(self, request, *args, **kwargs): | |||
monitoring_utils.set_custom_attribute('user_id', request.user.id) | |||
monitoring_utils.set_custom_attribute('is_staff', request.user.is_staff) | |||
is_staff = bool(has_access(request.user, 'staff', course_key)) | |||
can_masquarade = request.user.has_perm(permissions.CAN_MASQUARADE_LEARNER_PROGRESS, course_key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meanwhile @tehreem-sadat , please try to add a test that checks the flow when permissions.CAN_MASQUARADE_LEARNER_PROGRESS
returns True
and False
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yess, that can be added, thanks.
900fafd
to
2b1034a
Compare
Note: we'll most likely wait for |
testing on staging: https://github.com/nelc/edx-platform-strains/pull/325 |
…ile so can be override later
2b1034a
to
e7af2f0
Compare
Description
feat: move progress related apis permissions to standard permission file so it can be override for data researchers.
Supporting information
Related Issue: feat: Data Researcher to have access on course progress page of Students